package com.cssw.fyzb.core.dao.team;


import com.cssw.fyzb.core.model.dodb.Team;
import com.ydn.dbframe.plugin.activerecord.Page;
import com.ydn.dbframe.plugin.activerecord.parse.SqlParse;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * @Auther: zzf
 * @Date: 2020/12/3 11:40
 * @Description:
 */
@Repository
public class TeamDaoImpl implements TeamDao {

    @Override
    public Page<Team> list(int page, int limit, Map param) {
        SqlParse sqlParse = new SqlParse(param);
        sqlParse.addSQL("select t1.*,(select level_name from d_team_level t2 where t1.team_level=t2.level_id)level_name from t_team t1");
        return Team.dao.paginate(page, limit, sqlParse);
    }
}
